﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//using FileProcessingFramework.ToolBoxes;
namespace MotivLogger
{
    public class NewMessageEventArgs
    {
        public NewMessageEventArgs(string s) { Request = s; }
        public String Request { get; private set; }
    }
    public abstract class BaseCommunication
    {
        public delegate void NewMessageEventHandler(object sender, NewMessageEventArgs e);
        public event NewMessageEventHandler OnNewMessage;
       
        public abstract void Send(String message);
        public abstract void CreateServer();
        public abstract void Stop();
        public abstract void ServerStop();
        
        public void NewMessage(string message)
        {
            if (OnNewMessage != null)
                OnNewMessage(this, new NewMessageEventArgs(message));
        } 
    }
}
